const User = require('../models/userModel');
// 创建调试实例
const debug = require('debug')('app:users');

const getUserById = async (id) => {
  return await User.findByPk(id);
};

const createUser = async (userData) => {
  const user = await User.create(userData);
  debug('User created successfully: %O', user);
  console.log('数据接入user：', user)
  return user;
};

module.exports = {
  getUserById,
  createUser,
};
